home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1998 July / EnigmA AMIGA RUN 29 (1998)(G.R. Edizioni)(IT)[!][issue 1998-07 & 08].iso / recent / warpup1.lha / WarpUP-WarpOS / WarpRace / ModSrc / Memory / Read / LongRead.p < prev    next >
Text File  |  1997-10-14  |  2KB  |  80 lines

  1.  
  2.                 incdir  include:
  3.                 incdir  lvo:
  4.                 incdir  powerasm:source/powerpc_lib/warprace/
  5.  
  6.                 include exec/memory.i
  7.                 include powerpc/ppcmacros.i
  8.                 include powerpc/powerpc.i
  9.                 include warprace.i
  10.  
  11.                 include powerpc_lib.i
  12.  
  13.                 xref    _PowerPCBase
  14.                 xref    ErrParams
  15.  
  16.                 xdef    PPCCopy
  17.  
  18.                 smalldata
  19.                 escapestr
  20.  
  21.                 section code
  22.  
  23. LOOPCOUNT       =       1000
  24.  
  25. MEMSIZE         =       256*1024
  26. MEMLOOP         =       256
  27.  
  28. PPCCopy
  29.                 prolog
  30.                 pushgpr r29-r31
  31.                 mr      r31,r5
  32.                 liw     r4,MEMSIZE*2
  33.                 liw     r5,MEMF_PUBLIC
  34.                 li      r6,0
  35.                 CALLPOWERPC     AllocVecPPC
  36.                 mr.     r30,r3
  37.                 beq     .error
  38.                 mr      r3,r30
  39.                 bl      LongReadPPC
  40.                 lwz     r3,WRI_STARTTIMER_PPC(r31)
  41.                 mtlr    r3
  42.                 lwz     r3,WRI_LINKERDB(r31)
  43.                 blrl
  44.                 li      r3,MEMLOOP
  45.                 mtctr   r3
  46. .loop
  47.                 mr      r3,r30
  48.                 bl      LongReadPPC
  49.                 bdnz    .loop
  50.                 lwz     r3,WRI_STOPTIMER_PPC(r31)
  51.                 mtlr    r3
  52.                 lwz     r3,WRI_LINKERDB(r31)
  53.                 blrl
  54.                 mr      r31,r3
  55.                 mr      r4,r30
  56.                 CALLPOWERPC     FreeVecPPC
  57.                 mr      r3,r31
  58.                 b       .end
  59. .error
  60.                 liw     r4,MEMSIZE*2
  61.                 sw      r4,ErrParams
  62.                 li      r3,0
  63. .end
  64.                 popgpr
  65.                 epilog
  66.  
  67. LongReadPPC
  68.                 mfctr   r6
  69.                 li      r5,MEMSIZE>>6
  70.                 mtctr   r5
  71.                 subi    r3,r3,4
  72. .copy
  73.                 rept    16
  74.                 lwzu    r0,4(r3)
  75.                 endr
  76.                 bdnz    .copy
  77.                 mtctr   r6
  78.                 blr
  79.  
  80.